var YanAnAPP = YanAnAPP || {};
YanAnAPP.newsConfig = {
    picnews: "e7c5d4b0453f468e963e1d4c1dd66a84", //项目要闻
    dongtai: "e36a57e471fe4a1f89cdfcafcef399bc", //新闻
    yantu: "08887023d1514ea8b12dd46f4d2d5fb9", //政策法规
    fangjian: "6e98cf9a9c9a41a08d552c6a001ebf72", //申请流程
    daolu: "a54148d746e24fc181eb8bd162cdef20", //新区动态
    jiedian: "b66b64c386a84ad1877c3e0fec2cded1", //通知公告
    jinzhan: "8cbfb60b937b4756be1177395963517e", //文件模版下载
    zhengce: "9052e382028b4455b375d1d54cbd966e", //工作掠影
};
// YanAnAPP.adminId = 4;
YanAnAPP.adminId = 2;
// YanAnAPP.adminId = [2,4];
// YanAnAPP.managerId = ["4b7aeb05e8354927998dacd003070c36"];
// YanAnAPP.managerId = [4];
YanAnAPP.managerId = [2];
YanAnAPP.projExaminationOrgS = ["省发改委", "市发改委"];


//湘江新区项目地址配置
var XJXQ = {};
XJXQ.Local = window.location;
//经协系统服务器地址 + 端口
XJXQ.app_server = "http://127.0.0.1";
//地理信息系统服务器地址 +　端口
XJXQ.sgis_server = "http://127.0.0.1:9092";
//项目管理模块服务器地址 +　端口
XJXQ.project_server = "http://127.0.0.1:9005";
//信息管理模块服务器地址 +　端口
XJXQ.info_server = "http://127.0.0.1:9000";

window.LoginModuleConfig = {
    baseUrl: XJXQ.project_server + "/zdxm/dist",
    checkUserIsLogin: XJXQ.sgis_server + "/data/oAuth/isLogin", //登陆地理信息地址
    loginUrl: XJXQ.app_server + "/web/templates/base.html", //退出返回首页
    logoutUrl: XJXQ.sgis_server + "/data/", //用户登陆路径
    imgUrl: XJXQ.project_server + '/zdxm/static/img/head' //头部文件图片地址
};

(function() {
    var address = {};
    // var BASE = 'http://127.0.0.1:9527';//配置为经协系统IP+端口

    //取消ajax异步请求，先请求到数据再改成异步模式
    $.ajaxSettings.async = false;
    $.ajax({
        url: XJXQ.app_server + "/app/address/server",
        type: "get",
        dataType: "text",
        xhrFields: {
            withCredentials: true
        },
        crossDomain: true,
        error: function(e) {
            console && console.dir(e);
        },
        success: function(re) {
            if (re) {
                var json = eval("(" + re + ")");
                address = json.data;
            }
        }
    });
    $.ajaxSettings.async = true;

    //正式环境地址匹配
    window.app_address = {
        //系统首页
        app_index: address.app_index,
        //app_server + "/web/templates/base.html",
        //宏观数据管理
        macro_data_manage: {
            //宏观经济结构分析
            macro_economic: address.macro_economic,
            //app_server + "/web/templates/view/dataBoard.html",
            //新区产业结构分析
            new_town_industry: address.new_town_industry,
            //app_server + "/web/templates/macro/newTownIndustry.html",
            //宏观数据查询
            macro_iden_form: address.macro_iden_form,
            //app_server + "/web/templates/macro/idenForm.html",
            //宏观经济指标及构成
            macro_search: address.macro_search,
            //app_server + "/web/templates/macro/macro.html",
            //报表中心
            macro_form: address.macro_form
                //app_server + "/web/templates/report_center/report_center.html"

        },
        //项目建设管理
        project_build_manage: {
            //项目管理
            project_manage: address.project_manage,
            //project_server + "/zdxm/#/project_manage",
            //项目查询分析
            project_search: address.project_search,
            //project_server + "/zdxm/#/project_show",
            //项目统计
            project_statistics: address.project_statistics
                // project_server + "/jsfz/#/project_reloStatis"
        },
        //目标进度管理
        target_schedule_manage: {
            //目标制定
            objective: address.objective,
            // app_server + "/web/templates/iden/iden.html",
            //目标考核
            target_check: address.target_check,
            //app_server + "/web/templates/target_manage/target_check.html",
            //进度监测
            target_monitor: address.target_monitor
                //app_server + "/web/templates/target_manage/targetManagement.html"
        },
        //企业查询分析
        enterprise_search_analysis: {
            //联网直报
            online_report: address.online_report, //
            // app_server + "/web/templates/view/report.html",
            //企业信息查询
            enterprise_search: address.enterprise_search, //
            // app_server + "/web/templates/macro/enterpriseSearch.html",
            //企业结构分析
            enterprise_framework: address.inDeveloping,
            //一企一档
            one_company_one_record: address.one_company_one_record //
                // app_server + "/web/templates/view/enterpriseVolum.html"
        },
        //经济作战地图
        economic_fight_map: {
            //企业空间查询分析
            enterprise_space_search: address.enterprise_space_search, //
            // sgis_server + "/web/main/base.html",
            //可视化专题分析
            gallery: address.gallery, //
            // sgis_server + "/gallery2.1/http/",
            //产业链
            industry_chain: address.industry_chain //
                // app_server + "/web/templates/industry_chain/industry_chain.html"
        },
        //信息管理
        info_manage: {
            //成果管理
            result_manage: address.inDeveloping,
            //信息推送
            info_push: address.info_push //
                // info_server + "/portal/#1-0"
        },
        //系统管理
        app_system_manage: {
            //业务数据管理
            data_manage: address.inDeveloping,
            //用户管理
            user_manage: address.inDeveloping,
            //角色权限管理
            role_manage: address.inDeveloping
        },
        //用户管理
        user_manage: {
            //BI工具页面
            BI_tool: address.BI_tool, //
            // "http://127.0.0.1:9003/cboard/login.do",
            //制图工具页面
            drapt_tool: address.drapt_tool, //
            // sgis_server+"/tool2.1/http/",
            //业务数据管理（数据管理子系统）
            data_manage: address.data_manage //
                // app_server + '/web/templates/system_manage/system_manage.html'
        },
        //系统管理页面地址
        system_manage: address.system_manage //
            // app_server + '/web/templates/system_manage/system_manage.html'
    };

    //登录验证服务器相关地址
    window.login_url = {
        system_base_url: address.system_base_url, //系统路径
        base_url: address.base_url, //用户登陆路径
        gallery_url: address.gallery_url, //图库登陆路径
        base_page_url: address.base_page_url, //首页资源路径配置
        system_manage_url: address.system_manage_url //系统管理页面链接配置
    };

    //帆软报表页面
    window.fanruan = {
        //企业信息查询
        enterprise_search_path: address.enterprise_search_path,
        //分园区企业和工业情况
        report1: address.report1, //
        //规模工业产值本年累计排名前50位的企业情况表
        report2: address.report2,
        //GDP
        gdp: address.gdp,
        //固定投资额
        gt: address.gt,
        //规模以上工业
        gmgy: address.gmgy,
        //财政收入
        czsr: address.czsr,
        //社会消费品零售
        shxf: address.shxf,
        //人口
        rk: address.rk
    };
    //第三方页面嵌入
    window.dsf = {
        macro_iden: address.macro_iden //
            // 'http://127.0.0.1:8080/zhxq/f/zongForm' //宏观经济指标及构成
    };

    //联网直报地址
    window.net_report = {
        net1: address.net1, //
        // sgis_server + "/gallery2.1/http/",
        net2: address.net2, //
        // sgis_server +"/gallery2.1/http/",
        net3: address.net3, //
        // sgis_server +"/gallery2.1/http/",
        net4: address.net4 //
            // sgis_server +"/gallery2.1/http/"
    };

})();